const express = require('express');
const router = express.Router();
const cartController = require('../controllers/cartController');
const { authenticateToken } = require('../middleware/auth');
const { validateBorrowDays } = require('../middleware/validation');

router.use(authenticateToken);
router.get('/', cartController.getList);
router.post('/', validateBorrowDays, cartController.add);
router.delete('/:id', cartController.remove);

module.exports = router;